package com.ztgf.sys.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.sys.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.sys.mapper.SysHelpMapper;
import com.ztgf.sys.models.service.ISysHelpService;
import com.ztgf.sys.models.bo.SysHelpSaveBO;
import com.ztgf.sys.models.dto.SysHelpDTO;

/**
 * 制度表（帮助说明）控制器
 *
 * @author YUE
 * @Date 2020-05-27 14:54:01
 */
@DubboService
public class SysHelpServiceImpl extends ServiceImpl<SysHelpMapper, SysHelpDTO> implements ISysHelpService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(SysHelpSaveBO saveBO) {
        SysHelpDTO dto = new SysHelpDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
